<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <style>
  
        
        
    </style>

    <body>

        <ui:composition template="./../adminTemplate.xhtml">

            <ui:define name="title">
                title
            </ui:define>

            <ui:define name="page">
               
                <h:dataTable class ="form" value="#{listStock.dinnerIngredients}" var="c"
    			styleClass="order-table"
    			headerClass="order-table-header"
    			rowClasses="order-table-odd-row,order-table-even-row"
    		>
    		<h:column>
    			<f:facet name="header">
    				Id
    			</f:facet>
    				#{c.itemID}
    		</h:column>
    		<h:column>
    			<f:facet name="header">
    				Namn på rätt
				</f:facet>
    				#{c.itemName}
    		</h:column>
 			<h:column>
    			<f:facet name="header">
    				Beskrivning
				</f:facet>
    				#{c.itemDescription}
    		</h:column>
    		<h:column>
    			<f:facet name="header">
    				 Speciell rätt sant falskt
				</f:facet>
    				#{c.itemRarity}
    		</h:column>                    
                <h:column>
                    <f:facet name="header">
                            Antal i skafferiet
		    </f:facet>
            		#{c.itemStock}
    		</h:column>
           
           <h:column>
    			<f:facet name="header">
    				Åtgärd
				</f:facet>
               <h:form>
                   <h:commandButton value="Ta Bort" action="#{destroyStock.destroy(c.itemID)}"/>
               
                   <h:commandButton value= "Redigera" action="#{listStock.prepareUpdate(c)}"/>
               
               <h:commandButton value="Visa rätt" action="#{listStock.niceView(c.itemID)}"/>
               
               </h:form>
           </h:column>
                </h:dataTable>
            </ui:define>

        </ui:composition>

    </body>
</html>
